NetworkInfo

data class NetworkInfo(val activeNetwork: ActiveNetwork? = null, val wifi: List<NetworkInterface> = emptyList(), val ethernet: List<NetworkInterface> = emptyList()) : Parcelable

The NetworkInfo will contain a list of the wifi and ethernet interfaces as well as the information of the currently active network. Due to the fact that the network info can only be obtained on the active network, the active network info is provided separately from the network interfaces.

When multiple connections are available, the active network will be the one determined by the network score set by the AOSP or custom firmware for the connected networks.

Constructors

Link copied to clipboard
constructor(activeNetwork: ActiveNetwork? = null, wifi: List<NetworkInterface> = emptyList(), ethernet: List<NetworkInterface> = emptyList())

Properties

Link copied to clipboard

The current network the device is connected to. If null, the device is offline

Link copied to clipboard

the list of ethernet hardware interfaces currently available on the device

Link copied to clipboard

the list of wifi hardware interfaces currently available on the device

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)